<script setup lang="ts">
import type { NuxtError } from '#app';

defineProps({
  error: Object as () => NuxtError
});
function goHome() {
  clearError({ redirect: '/' });
}
</script>

<template>
  <div>
    <h1>{{ error?.statusCode }}</h1>
    <h1>{{ error?.message }}</h1>
    <button @click="goHome">Go back home</button>
  </div>
</template>
